let Next = fun(".x-fl .button-next");
let Prev = fun(".swiper-container .button-prev");
let ul = fun(".swiper-container .swiper-slide");
let liList = fun(".swiper-container .swiper-slide .ull");
let n = 0;


function fun(selector){
	var result = document.querySelectorAll(selector);
	if(result.length === 1){
		return result[0];
	}
	return result;
}


Next.onclick=function(){
	let ml = parseInt(ul.style.marginLeft);
		if (ml==0) {
			ul.style.marginLeft = "-1090px";
		}else{
			ul.style.marginLeft = -(liList.length - 1) * 1090 + "px";
		}
	ul.style.transition= "all 0.5s";
}

Prev.onclick=function(){
	// console.log(111);
	let ml = Math.abs(parseInt(ul.style.marginLeft));
		if (ml==2180) {
			ul.style.marginLeft= "-1090px";
		}else{
			ul.style.marginLeft = "0px";
		}
		
	ul.style.transition= "all 0.5s";
}
